package demo.standard;

public class LeafNode implements INode {
    private String name;

    public LeafNode() {
    }

    public LeafNode(String name) {
        this.name = name;
    }

    @Override
    public void use() {
        System.out.println("使用叶子节点：" + name);
    }


    @Override
    public void addChild(INode child) {
    }

    @Override
    public void removeChild(INode child) {
    }

    @Override
    public INode getChild(int index) {
        return null;
    }
}
